<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>长者生活满意度调查列表</title>
	<#include "/common/resource.ftl">
</head>
<body>

<div class="ui-operation">
    <div class="ui-buttons">
        <div class="layui-btn-group tools">
            <@auth code='seniorsSatisfactionQuestionnaire_add'><button class="layui-btn layui-btn-normal open-dialog" p="url:'${params.contextPath}/view/business/seniorsSatisfactionQuestionnaire/seniorsSatisfactionQuestionnaire_edit.htm',title:'添加长者生活满意度调查表',width:'80%',height:'100%'"><i class="fa fa-plus"></i>添加</button></@auth>
            <@auth code='seniorsSatisfactionQuestionnaire_update'><button class="layui-btn layui-btn-normal singleSelected" p="url:'${params.contextPath}/view/business/seniorsSatisfactionQuestionnaire/seniorsSatisfactionQuestionnaire_edit.htm',title:'编辑长者生活满意度调查表',width:'80%',height:'100%'"><i class="fa fa-pencil"></i>修改</button></@auth>
            <@auth code='seniorsSatisfactionQuestionnaire_delete'><button class="layui-btn layui-btn-normal remove-button" reurl="${params.contextPath}/web/seniorsSatisfactionQuestionnaire/delete.json"><i class="fa fa-remove"></i>删除</button></@auth>
        </div>
        <div class="ui-searchs">
            <div class="value"><input type="text" name="name" value="" placeholder="名称"/></div>
            <input type="button" value="搜索" class="layui-btn layui-btn-danger search-button"/>
        </div>
    </div>
</div>
<div class="ui-content" style="padding-left: 10px;padding-right:10px;">
    <table id="datagrid" options="url:'${params.contextPath}/web/seniorsSatisfactionQuestionnaire/list.json',params:'getSearchParams',dblClickRow:'showDetail'">
        <thead>
			<tr>
				<th data-options="field:'id',checkbox:true"></th>
				<th data-options="field:'elderName',width:100,align:'left'">老人姓名</th>
				<th data-options="field:'abuseElderStatusStr',width:100,align:'left'">护理员有无打骂、虐待长者</th>
				<th data-options="field:'abuseElderStatusSuggest',width:100,align:'left'">对护理员打骂长者建议</th>
				<th data-options="field:'caregiverWashSatisfactionStr',width:100,align:'left'">对护理员洗澡等是否满意</th>
				<th data-options="field:'caregiverWashSatisfactionSuggest',width:100,align:'left'">对护理员洗澡等建议</th>
				<th data-options="field:'caregiverGentleStatusStr',width:100,align:'left'">护理员语气是否温和</th>
				<th data-options="field:'caregiverGentleStatusSuggest',width:100,align:'left'">对护理员语气建议</th>
				<th data-options="field:'caregiverSatisfactionStatusStr',width:100,align:'left'">对护理员是否满意</th>
				<th data-options="field:'caregiverSatisfactionStatusSuggest',width:100,align:'left'">对护理员满意度建议</th>
				<th data-options="field:'doctorServiceSatisfactionStatusStr',width:100,align:'left'">医生服务满意度</th>
				<th data-options="field:'doctorServiceSatisfactionStatusSuggest',width:100,align:'left'">对医生服务建议</th>
				<th data-options="field:'nurseServiceSatisfactionStatusStr',width:100,align:'left'">护士服务满意度</th>
				<th data-options="field:'nurseServiceSatisfactionStatusSuggest',width:100,align:'left'">对护士服务建议</th>
				<th data-options="field:'dailyActivitiesAbundantStr',width:100,align:'left'">日常活动是否丰富</th>
				<th data-options="field:'dailyActivitiesAbundantSuggest',width:100,align:'left'">日常活动建议</th>
				<th data-options="field:'mealSatisfactionStatusStr',width:100,align:'left'">伙食满意度</th>
				<th data-options="field:'mealSatisfactionStatusSuggest',width:100,align:'left'">伙食建议</th>
				<th data-options="field:'otherServiceSatisfactionStatusStr',width:100,align:'left'">其他各方面服务满意度</th>
				<th data-options="field:'otherServiceSatisfactionStatusSuggest',width:100,align:'left'">其他各方面服务建议</th>
				<th data-options="field:'environmentSatisfactionStatusStr',width:100,align:'left'">环境卫生满意度</th>
				<th data-options="field:'environmentSatisfactionStatusSuggest',width:100,align:'left'">环境卫生建议</th>
				<th data-options="field:'resolveProblemSatisfactionStatusStr',width:100,align:'left'">问题解决及时性</th>
				<th data-options="field:'resolveProblemSatisfactionStatusSuggest',width:100,align:'left'">解决问题及时性建议</th>
				<th data-options="field:'improveQualityStatusStr',width:100,align:'left'">相比入住前生活质量是否提高</th>
				<th data-options="field:'improveQualityStatusSuggest',width:100,align:'left'">生活质量提高建议</th>
				<th data-options="field:'pensionCenterSuggestion',width:100,align:'left'">对养老中心建议</th>
				<th data-options="field:'workerSuggestion',width:100,align:'left'">对工作人员建议</th>
				<th data-options="field:'expectElderLife',width:100,align:'left'">期望老年生活</th>
			</tr>
        </thead>
    </table>
</div>
<script type="text/javascript">
    function getSearchParams() {
        return {elderName: $("input[name='name']").val()};
    }
    var showDetail = function (index, row) {
        <@auth code='seniorsSatisfactionQuestionnaire_detail'>
            var url = "${params.contextPath}/view/business/seniorsSatisfactionQuestionnaire/seniorsSatisfactionQuestionnaire_detail.htm?id=" + row.id;
            DialogManager.openDialog("url:'" + url + "',title:'长者生活满意度调查表详情',width:'80%',height:'100%'");
        </@auth>
    };
    //formatter:formatState
    function formatState(val, row) {
    }

    $(function () {
        $(".remove-button").click(function () {
            var ids = DataGrid.getCheckedIds();
            if (ids == "") {
                layer.msg("请选择删除记录")
                return false;
            }
            var url = $(this).attr("reurl");
            layer.confirm('确定删除记录', function () {
                $.ajaxRequest({
                    type: 'post',
                    url: url,
                    data: {ids: ids.join(",")},
                    success: function (data) {
                        $.message(data.message);
                        if (data.success) {
                            DataGrid.reload();
                        }
                    }
                });
            });
        });
    });
</script>
</body>

</html>
